package com.mmall.util;

import java.util.ArrayList;
import java.util.List;

import com.google.common.base.Splitter;

public class StringUtil {

    public static List<Integer> splitToListInt(String str) {
        List<String> strList = Splitter.on(",").trimResults().omitEmptyStrings().splitToList(str);
        //return strList.stream().map(strItem -> Integer.parseInt(strItem)).collect(Collectors.toList());
        return convertToStaffPublic(strList);
    }
    
    private static List<Integer> convertToStaffPublic(List<String> staff) {
        List<Integer> result = new ArrayList<Integer>();
        for (String str : staff) {
            result.add(Integer.parseInt(str));
        }
        return result;
    }
}
